package com.zyb;

import com.zyb.dao.OrderDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppForlnstanceOrder {
    public static void main(String[] args) {
        //通过静态工厂创建对象
        ApplicationContext ctx = new
                ClassPathXmlApplicationContext("applicationContext.xml");
        OrderDao orderDao = (OrderDao) ctx.getBean("orderDao");
        orderDao.save();
    }
}
